package com.hs.sfzy.controller;

import com.github.pagehelper.PageInfo;
import com.hs.sfzy.entity.Fm;
import com.hs.sfzy.service.FmService;
import com.hs.sfzy.until.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("fm")
public class FmController {
    @Autowired
    FmService fmService;
    @GetMapping("page")
    public R getAll( int pageNum, int pageSize){
        PageInfo<Fm> fmPageInfo = fmService.selectAll(pageNum, pageSize);
        return R.ok(fmPageInfo);
    }
}
